﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo12_1_2
{
    internal class Program
    {
        static void Main(string[] args)
        {
            var per1 = new Person();
            FinalizeTest();
            Console.WriteLine("分配Ok");
            Console.ReadLine();
        }

        static void FinalizeTest() {
            var Per2 = new Person2();
        }
      
    }
    public class Person
    {

        public string Name { get; set; }

    }
    public class Person2
    {

        ~Person2() { Console.WriteLine("析构函数"); }
        public string Name { get; set; }

    }
}
